/**
 * Created by xiaoxiao on 2019/7/22.
 */
var task_id=GetQueryString('task_id');
var modifyData;
var qxlist ;
var dhbm ;
var readflag = true;
var processDefKey = "minbobianmu";
$(document).ready(function(){

    getUserInfo();
    qxlist = UserInfo.qxlist;

	var result = ajaxResult("get",false,"/cnmuseum/bm/getdetail",{"task_id":task_id});
    if(result.status=='OK'){
        modifyData=result.data;
        loadAddHtml();
    }

});
//审核是否通过，0表示通过，1是不通过
function submit(flag,ele){
	$("a[name=btn]").button('loading').delay(1000).queue(function() {
		$("a[name=btn]").button('reset');
		$("a[name=btn]").dequeue(); 
	});
	$(ele).button('loading').delay(1000).queue(function() {
		$(ele).button('reset');
		$(ele).dequeue(); 
	var params=$('#addForm').serializeObject();
	var words;
	if(flag==0){//通过
		params.next='sh';
		words='数据编目审核提交成功';
	}else{//退回
		params.next='bm';
		words='数据编目审核退回修改成功';
	}
	
	var result=ajaxResult('POST',false,'/cnmuseum/bm/submit',params);
	if(result.status=='OK'){
		alertFunc(words,function(){
			location.href='zysh.html';
		});
	}else{
		bootbox.alert(result.msg);
	}
	});
}